package com.gitee.huanminabc.fastboot.mapstruct;

import com.gitee.huanminabc.jcommon.reflect.ClassUtil;
import com.gitee.huanminabc.fastboot.load.classload.ClassLoadIntercept;
import com.gitee.huanminabc.jmapstruct.MapperConverter;

/**
 * 简要描述
 *
 * @Author: huanmin
 * @Date: 2025/4/13 00:51
 * @Version: 1.0
 * @Description: 文件作用详细描述....
 */
public class MapstructClassLoad implements ClassLoadIntercept {
    @Override
    public Object createBean(Class<?> clazz) throws Exception {
        if (MapperConverter.class.isAssignableFrom(clazz)) {
            return ClassUtil.newInstance(clazz);

        }
        return ClassLoadIntercept.super.createBean(clazz);
    }

}
